import { defHttp } from '@/utils/http/axios'

// 查询商户授权配置列表
export function getAppInfoPage(params) {
  return defHttp.get({ url: '/biz/app-info/page', params })
}

// 查询商户授权配置详情
export function getAppInfo(id: number) {
  return defHttp.get({ url: `/biz/app-info/get?id=${id}` })
}

// 新增商户授权配置
export function createAppInfo(data) {
  return defHttp.post({ url: '/biz/app-info/create', data })
}

// 修改商户授权配置
export function updateAppInfo(data) {
  return defHttp.put({ url: '/biz/app-info/update', data })
}

// 删除商户授权配置
export function deleteAppInfo(id: number) {
  return defHttp.delete({ url: `/biz/app-info/delete?id=${id}` })
}

// 导出商户授权配置 Excel
export function exportAppInfo(params) {
  return defHttp.download({ url: '/biz/app-info/export-excel', params }, '商户授权配置.xls')
}